package com.zhu.tool_test.datacenter.dto;

import com.linktopa.framework.common.model.response.ObjectResponseResult;
import com.linktopa.framework.common.model.response.ResultCode;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @Description 分页查询返回封装
 * @author yhD
 * @date 2020-09-24
 * @version 1.0
 */
@Data
@ToString
@NoArgsConstructor
final public class ObjectTimeResponseResult<T> extends ObjectResponseResult<T> {

    /**
     * yyyy-MM-dd HH:mm:ss
     */
    String localDateTime;


    public ObjectTimeResponseResult(ResultCode resultCode, T data, String localDateTime) {
        super(resultCode, data);
        this.localDateTime = localDateTime;
    }

    public ObjectTimeResponseResult(ResultCode resultCode, String localDateTime) {
        super(resultCode);
        this.localDateTime = localDateTime;
    }

    public ObjectTimeResponseResult(String localDateTime) {
        this.localDateTime = localDateTime;
    }


    @Override
    public String toString() {
        return "ObjectTimeResponseResult{" +
                "localDateTime='" + localDateTime + '\'' +
                "data='" + super.toString() + '\'' +
                "success='" + super.isSuccess() + '\'' +
                "message='" + super.getMessage()+ '\'' +
                '}';
    }
}
